package com.ltlixer.bootadmin.gateway.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ltlixer.bootadmin.api.dto.UserDto;
import com.ltlixer.bootadmin.api.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController {

    @Reference
    private UserService userService ;

    @RequestMapping("/getUser")
    public UserDto getUser(UserDto userDto){
        return userDto;
    }

    @RequestMapping("/list")
    public List<UserDto> list(){
        return userService.listUsers();
    }

}
